//
//  FCValueContoller.swift
//  FinancialConsulting
//
//  Created by Max on 2017/11/7.
//  Copyright © 2017年 com.vector. All rights reserved.
//

import UIKit

class FCValueContoller: FCViewController {

    @IBOutlet weak var imageButton: UIButton!
    override func viewDidLoad() {
        super.viewDidLoad()

        
        if self.navigationItem.leftBarButtonItem == nil {
            let btn = UIButton(type: UIButtonType.custom)
            btn.setImage(UIImage(named: "21"), for: UIControlState())
            btn.addTarget(self, action: #selector(FCValueContoller.backItemPressed(_:)), for: UIControlEvents.touchUpInside)
            btn.sizeToFit()
            self.navigationItem.leftBarButtonItem = UIBarButtonItem(customView: btn)
        }

        
        
        self.title = "信用分值"
        
        
        let temp = Int(arc4random()%100)+1
        
        if temp % 2 == 0 {
            
           imageButton.setImage(UIImage(named:"38"), for: .normal)
        
        
        }else {
        
        
           imageButton.setImage(UIImage(named:"39"), for: .normal)
            
            
        
        }
        
    }

       
    override func backItemPressed(_ sender: AnyObject) {
        let v = FCCenterViewController()
        
        self.navigationController?.pushViewController(v, animated: true)
        
        
        
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    
}
